<?php


namespace Mslynn\Live\Block;




use Magento\Framework\Unserialize\Unserialize;
use Mslynn\Live\Helper\Data;

class LiveBlock extends \Magento\Framework\View\Element\Template
{
    protected  $_config;
    protected $moduleReader;
    protected $_logo;
    protected $_unserialize;
    public function __construct(

        \Magento\Theme\Block\Html\Header\Logo $logo,
        \Magento\Backend\Block\Template\Context $context,
        \Magento\Framework\Module\Dir\Reader $moduleReader,
        Data $config,
        array $data = []
    )
    {
        $this->moduleReader = $moduleReader;
        $this->_config=$config;
        $this->_logo=$logo;

        parent::__construct($context, $data);
    }

    public function getEnable(){
        return $this->_config->getGeneralConfig('enable');
    }
    public function getLiveUrl(){
        return $this->_config->getGeneralConfig('live');
    }
    public function  getliveenable(){
        return $this->_config->getGeneralConfig('liveenable');
    }
    public function getLogo(){

        return $this->_logo->getLogoSrc();
    }
    public function LiveUrl(){

    }
    /**
     * 获取背景图
     * @return string
     */
    public function getBackgroud()
    {
        if ($this->_config->getGeneralConfig('background')) {
            return $this->getUrl('media/logo') . $this->_config->getGeneralConfig('background');
        }
    }
}